<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        .mylist{
            width:100px;
            height:100px;
            background-color: blue;
            position:absolute;
        }
    </style>
    <script src="./js/Tween.js"></script>
</head>
<body>
<div class="mylist" id="myElement"></div>
<script>
    var position={ top: 0, left: 0 }
    var element = document.getElementById('myElement');
    console.log(element)
    function animate(time) {
        requestAnimationFrame(animate);
        TWEEN.update(time);
    }
    requestAnimationFrame(animate);
    var tween = new TWEEN.Tween(position)
        .to({ top: 100, left: 100 }, 1000)
        .onUpdate(function() {
            console.log(position)
            element.style.transform = 'translate(' + position.left + 'px, ' + position.top + 'px)';
        })
        .start();
</script>
</body>
</html>